import { instance } from "../utils/request";
const getPromotionsPagination = async (params) => {
	return await instance.get("/Promotions/Pagination", params);
};

const addPromotions = async (data) => {
	return await instance.post("/Promotions/Add", data);
};

const updatePromotions = async (data) => {
	return await instance.post("/Promotions/Update", data);
};

const getPromotionsDetail = async (id) => {
	return await instance.get("/Promotions/Detail", { id : id });
};

const deletePromotions = async (id) => {
	return await instance.post("/Promotions/Delete", { id : id });
};

const promotionsApi = {
	getPromotionsPagination,
	addPromotions,
	updatePromotions,
	getPromotionsDetail,
	deletePromotions,
};

export default promotionsApi
